<%@ page contentType="text/html; charset=utf-8" language="java"    pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>欢迎光临北京清真俄丽娅西点</title>
		<meta name="Generator" content="俄丽娅" />
		<meta name="Keywords" content="俄丽娅,蛋糕,五环内免费送货,北京俄丽娅,北京清真生日蛋糕" /> 
		<meta name="Description" content="北京俄丽娅清真西点_拥有清真乳酪蛋糕、慕斯蛋糕、巧克力蛋糕、乳脂奶油蛋糕和冰淇淋蛋糕五个系列30款主题蛋糕。" />
		
        <link rel="icon" type="image/gif" href="images/icon.gif" />
        <link rel="stylesheet" type="text/css" href="style/global.css" media="all" />
		<link rel="stylesheet" type="text/css" href="style/common.css" media="all" />
		<link rel="stylesheet" type="text/css" href="style/detail.css" media="all" />
		<link rel="stylesheet" type="text/css" href="style/style.css" />
		<link rel="stylesheet" type="text/css" href="style/thickbox.css" media="screen" />
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="js/thickbox.js"></script>
		<script type="text/javascript">
				function commentContent(){
					var commentTitle=jQuery("#commentTitle").val();
					var commentContent=jQuery("#commentContent").val();
					var breadId="${bread.id}";
					jQuery.post("addComment",{commentTitle:commentTitle,commentContent:commentContent,breadId:breadId,r:Math.random()},function(json){
						if(json.success==1){
							 alert('操作成功');
							 location.href="detail.html?id=${bread.id }";
						}else{
							 alert('操作频繁，请稍后重试');
						}
					},"json");
				}
				
				function changePrice(mysize,myprice){
					jQuery('#breadPriceWindow').html("蛋糕尺寸："+mysize+"价格：￥"+myprice);					
				}
				
		</script>
    </head>
    <body>
        <div class="container">
			<jsp:include page="header.jsp" />
			<div class="main">
				<div class="onlyline ml10 mr10"></div>
				<div class="breadcrumbs">
					当前位置：<a href="index.html">首页</a> > <a href="bigClassPage.html?id=${bigClass.id}">${bigClass.name}</a> > <a href="smallClassPage.html?id=${smallClass.id }">${smallClass.name }</a> > ★${bread.name}
				</div>
				<div class="section">
					<div class="cakeInfo">
						<div class="fleft cakeShow"><img src="images/${bread.bigPicUrl }" width="400" height="300" alt="${bread.name}"/></div>
						<h3>${bread.name}</h3>
						<p class="pr">商品总价：<span id="price">￥${bread.price}</span></p>
						<p>编号：${bread.code}</p>
						<p>品牌：俄丽娅 <a href="smallClassPage.html?id=${smallClass.id }" class="moreProduct">[查询该种类所有商品]</a></p>
						<p>单位：个</p>
						<p>重量：￥${bread.heavy}</p>
						<c:if test="${fn:length(breadPrices) > 0}">
							<table class="chooseTable">
								<c:forEach items="${breadPrices}"  var="breadPrice" varStatus="i">
									<c:if test="${i.first or i.index%2==0}">
										<tr>
									</c:if>
									<td><label><input type="radio" name="choose" id="${breadPrice.id }" onchange="changePrice('${breadPrice.size }','${breadPrice.price }')" /> ${breadPrice.size } ￥${breadPrice.price }</label></td>
									<c:if test="${i.last or i.index%2==1}">
										</tr>
									</c:if>
								</c:forEach>
							</table>	
						</c:if>
						
							<div class="mt30">
								<a href="#TB_inline?height=100&width=600&inlineId=myOnPageContent" title="俄丽娅清真西点提示您" style="padding:7px 16px;color:#FFF;border-radius:3px;font-size:15px;background:#EA7C23;margin-right:10px;" class="thickbox" type="button">立即购买</a>
								<!-- <a href="#" onclick="javascript:window.external.addFavorite('http://www.eliyacake.com','eliya')" class="button lightblue">加入收藏</a> -->
								<a href="http://www.eliyacake.com/detail.html?id=${bread.id }" onclick="window.external.addFavorite(this.href,this.title);return false;" class="button lightblue" title='俄丽娅' rel="sidebar">加入收藏</a>
							</div>
					</div>
					<div class="onlyline ml10 mr10"></div>
					<div class="article">
						<h4 class="infoTit">产品信息</h4>
						<div class="detailInfo">
							<p>${bread.content}</p>
							<c:forEach items="${breadPics }" var="breadPic">
								<p><img src="images/${breadPic.picUrl }" alt="" width="780" height="530"/></p>
							</c:forEach>
							<c:if test="${fn:length(breadPics) eq 0}">
								<p><img src="images/banner.jpg" alt="" width="780" height="530"/></p>
							</c:if>
						</div>				
					</div>
					<div class="onlyline ml10 mr10"></div>
					<div class="productProperty">
						<h4 class="infoTit">产品属性：</h4>
						<ul>
							<li>[口味]  ${bread.taste }</li>
							<li>[主要原料]	${bread.stock }</li>
							<li>[蛋糕尺寸]	${bread.mySize }</li>
							<li>[保鲜条件]	${bread.myCondition }</li>
							<li>[适合人群]	${bread.people }</li>
							<li>[送货时间]	${bread.sendTime }</li>
						</ul>
					</div>
					<div class="onlyline ml10 mr10"></div>
					<div class="feedback">
					
						<c:if test="${fn:length(comments) > 0}">
							<h4 class="infoTit">评论：</h4>
							<table class="commentTable" width="90%" >
								<c:forEach items="${comments }" var="comment" varStatus="i">
									<tr>
										<td width="5%" align="center"><font color="#387963">标题：</font></td>
										<td width="10%" align="left">${comment.commentTitle }</td>
										<td width="5%" align="center"><font color="#387963">时间：</font></td>
										<td width="20%" align="left"><fmt:formatDate value="${comment.createTime }" pattern="M/d/yyyy HH:mm:ss"/> </td>
									</tr>
									<tr>
										<td width="5%" align="center"  <c:if test="${not i.last}">class="bottomline"</c:if>><font color="#387963">内容：</font></td>
										<td width="50%" align="left" colspan="3" <c:if test="${not i.last}">class="bottomline"</c:if> > ${comment.commentContent }</td>
									</tr>
								</c:forEach>
							</table>
						</c:if>
						<h4 class="infoTit">发表点评：</h4>
							<table class="commentTable">
								<tr>
									<td>评论标题：</td>
									<td><input type="text" name="" id="commentTitle" /></td>
								</tr>
								<tr>
									<td>评论内容：</td>
									<td><textarea rows="3" cols="20" id="commentContent"></textarea></td>
								</tr>
								<!-- 
									<tr>
										<td>验证码：</td>
										<td class="checkBox"><input type="text" name="" id="checkCode" /><span><img src="images/banner.jpg" alt="" width="78" height="20"/></span><a href="#">看不清？更换一张</a></td>
									</tr>
								 -->
								<tr>
									<td></td>
									<td class="subBox"><a href="javascript:commentContent()" class="button orange mr10">提 交</a></td>
								</tr>
							</table>
					</div>
				</div>			
			</div>
		</div>
	<jsp:include page="footer.jsp" />
	
	<div id="myOnPageContent" style="display:none;">
			<p>您希望购买的是：【${bread.name }】,蛋糕编码：【${bread.code }】</p>
			<p><img src="images/${bread.smallPicUrl }" alt="${bread.name}"/></p>
			<p>蛋糕介绍：${bread.content }</p>
			<p id='breadPriceWindow'>
				 
			</p>
			<p>
				为了保证我们尽快发货，请您拨打订购电话：4006-823-123或010-65482911完成订购，祝您购物愉快
			</p>
	</div>
    </body>
</html>
